// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;

import java.math.BigDecimal;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * SalesOrderTaxItem generated by hbm2java
 */
@Entity
@Table(name = "sales_order_tax_item", catalog = "magento", uniqueConstraints = @UniqueConstraint(columnNames = {
		"tax_id", "item_id" }))
public class SalesOrderTaxItem implements java.io.Serializable {
	private static final long serialVersionUID = 121323L;

	private Integer taxItemId;
	private SalesOrderTax salesOrderTax;
	private SalesFlatOrderItem salesFlatOrderItem;
	private BigDecimal taxPercent;

	public SalesOrderTaxItem() {
	}

	public SalesOrderTaxItem(SalesOrderTax salesOrderTax,
			SalesFlatOrderItem salesFlatOrderItem, BigDecimal taxPercent) {
		this.salesOrderTax = salesOrderTax;
		this.salesFlatOrderItem = salesFlatOrderItem;
		this.taxPercent = taxPercent;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "tax_item_id", unique = true, nullable = false)
	public Integer getTaxItemId() {
		return this.taxItemId;
	}

	public void setTaxItemId(Integer taxItemId) {
		this.taxItemId = taxItemId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "tax_id", nullable = false)
	public SalesOrderTax getSalesOrderTax() {
		return this.salesOrderTax;
	}

	public void setSalesOrderTax(SalesOrderTax salesOrderTax) {
		this.salesOrderTax = salesOrderTax;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "item_id", nullable = false)
	public SalesFlatOrderItem getSalesFlatOrderItem() {
		return this.salesFlatOrderItem;
	}

	public void setSalesFlatOrderItem(SalesFlatOrderItem salesFlatOrderItem) {
		this.salesFlatOrderItem = salesFlatOrderItem;
	}

	@Column(name = "tax_percent", nullable = false, precision = 12, scale = 4)
	public BigDecimal getTaxPercent() {
		return this.taxPercent;
	}

	public void setTaxPercent(BigDecimal taxPercent) {
		this.taxPercent = taxPercent;
	}

}
